package top.zhangjianyong.blog.params.blog;

import jakarta.validation.constraints.NotBlank;
import java.util.List;

/**
 * @author zhangjianyong
 * @since 2024/7/31 下午8:56
 */
public record BlogSaveOrUpdateParam(
    Long id,
    @NotBlank(message = "标题不能为空") String title,
    Long categoryId,
    String mkContent,
    Integer topFlag,
    List<String> tags,
    String summary,
    String backgroundImg) {

  public BlogSaveOrUpdateParam {
    if (null == id && null == topFlag) topFlag = 0;
  }
}
